package cn.source.zk.service;

import cn.source.zk.domain.entity.Substation;
import cn.source.zk.domain.entity.SubstationStatVO;
import cn.source.zk.domain.entity.SubstationTypeStatVO;
import cn.source.zk.domain.vo.SubstationConnectionPointVO;
import com.alibaba.fastjson2.JSONObject;

import java.util.List;
import java.util.Map;

public interface IZkSubstationService {


    /**
     * 查询变电站分页列表
     * @param substation
     * @return
     */
    List<Substation> listPage(Substation substation);

    /**
     * 新增变电站
     * @param substationList
     * @return
     */
    int add(List<Substation> substationList);

    /**
     * 根据num查询变电站信息
     * @param num
     * @return
     */
    Substation getByNum(Long num);

    Map<String, Object> getLatest10PointsLineData();


    /**
     * 修改变电站信息
     * @param substationList
     * @return
     */
    int edit(List<Substation> substationList);

    /**
     * 批量删除变电站信息
     * @param nums
     * @return
     */
    int removeBatch(List<Long> nums);

    /**
     * 检车变电站名称是否存在
     * @param name
     * @return
     */
    Boolean checkSubstationExist(String name,Long num);

    List<SubstationStatVO> getStatsByDimension(String dimension);


    List<SubstationConnectionPointVO> listPageFold(Substation substation);

    JSONObject getSubstationCountByArea();

    List<JSONObject> getDeviceCountBySubstationType();

    List<JSONObject> getSubstationCountByType();

    JSONObject getMonthlyAdditions(String timeRange);

    List<Map<String,Object>> getRegionCountForPieChart();

    List<SubstationTypeStatVO> getTypeDistributionAndYoY();


}
